package com.dnjn.happiness.system.domain.vo;

import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.dnjn.happiness.common.core.xss.Xss;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

@Schema(name = "ExportTeam", description = "导入导出sysTeam封装")
@Accessors(chain = true)
@ToString
@Getter
@Setter
public class ExportTeamVO extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    private Long teamId;

    private Long deptId;

    private Long userId;

    private Long currDeptId;

    @Excel(name = "部门")
    private String deptName;

    @Excel(name = "工号")
    private String empno;

    @Xss(message = "用户昵称不能包含脚本字符")
    @NotBlank(message = "姓名不能为空")
    @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
    @Excel(name = "姓名")
    private String nickName;

    @Excel(name = "邀请码")
    private String inviteCode;

    @Excel(name = "上级工号")
    private String parentEmpno;

    @Xss(message = "用户昵称不能包含脚本字符")
    @NotBlank(message = "上级姓名不能为空")
    @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
    @Excel(name = "上级姓名")
    private String parentName;

    private Long parentId;

    private Integer cellIndex;

    private List<ExportTeamVO> child;

    /**
     * 是否管理员
     */
    @Schema(description = "是否管理员")
    private Boolean isManager;

}
